<el-dialog width="600" :title="titleMap[dialogStatus]" :visible.sync="editVisible" :before-close="handleClose">
    <el-form ref="modelForm" :model="modelForm" label-width="70px" style="width:85%; margin-left:25px;">
        <input type="hidden" name="modelid" v-model="modelForm.modelid">
        <input type="hidden" name="model" v-model="modelForm.model">
        <el-form-item label="昵称" prop="nickname">
            <el-input v-model="modelForm.nickname" />
        </el-form-item>
        <el-form-item label="用户名" prop="username">
            <el-input v-model="modelForm.username" />
        </el-form-item>
        <el-form-item label="密码" prop="password">
            <el-input v-model="modelForm.password" />
        </el-form-item>
        <el-form-item label="邮箱" prop="email">
            <el-input v-model="modelForm.email" />
        </el-form-item>

        <el-form-item label="头像" prop="avatar">
            <template v-if="modelForm.avatar">
                <img class="app-blog-form-img" width="60%" :src="modelForm.avatar" alt="" />
                <div class="app-form-preview">
                    <el-button size="small" block type="danger" plain icon="el-icon-delete" @click="handleDelImg">删除</el-button>
                </div>
            </template>
            <template v-else>
                <el-upload ref="upload" action="/admin/upload/image" list-type="picture-card" :multiple="false" :on-success="handleUploadSuccess" :on-preview="handleImgPreview" :on-remove="handleRemove">
                    <i class="el-icon-plus"></i>
                </el-upload>
                <el-dialog :visible.sync="dialogVisible" :append-to-body="true">
                    <img width="100%" :src="dialogImageUrl" alt="" />
                </el-dialog>
            </template>
        </el-form-item>

    </el-form>
    <div slot="footer" class="dialog-footer">
        <el-button @click="handleCancel">取消</el-button>
        <el-button type="primary" @click="dialogStatus === 'create' ? createData() : updateData() ">确认</el-button>
    </div>
</el-dialog>
